Skip to content

fix(points): final-price lookback includes the hour exactly 7 days back - #144

Merged
kevincodex1 merged 1 commit into
mainfrom
fix/points-price-lookback-inclusive
Nov 11, 2026
Merged

kevincodex1 merged 1 commit into
mainfrom
fix/points-price-lookback-inclusive

Conversation

@kevincodex1

@kevincodex1 kevincodex1 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

quoteUsdAtHour documents rows 'at most FINAL_PRICE_LOOKBACK_MS older', but the query used a strict bound and dropped a quote whose last captured hour sat exactly on the edge of the window.

Summary by CodeRabbit

  • Bug Fixes
    • Quote prices at the exact lower edge of the lookback window are now included.

quoteUsdAtHour documents rows 'at most FINAL_PRICE_LOOKBACK_MS older', but the
query used a strict bound and dropped a quote whose last captured hour sat
exactly on the edge of the window.
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The hourly quote lookup now includes a price exactly at the seven-day lower lookback boundary. The upper bound remains inclusive.

Changes: Hourly quote lookup

Layer / File(s) Summary
Include the lower lookback boundary
app/src/lib/points/server.ts
quoteUsdAtHour now includes prices at the seven-day lower cutoff. The upper bound remains inclusive.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Merge Risk: Minimal · up to dadd4

This fixes the final-price lookback so a quote exactly seven days old is now included. No merge-blocking risk was identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: including the quote at the exact seven-day final-price lookback boundary.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 97a27a3e-7b07-4450-9bda-00dd612c1696
Commits

Reviewing files that changed from the base of the PR and between f317fdd and dadd4e4.

Files selected for processing: 1

  • app/src/lib/points/server.ts

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

@kevincodex1
kevincodex1 merged commit 70e4fa2 into main Nov 11, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant